<script>
    export default {
      data() {
        return {
          tableData: [
            /*{
              jobname:"机器学习工程师",
              city:"北京",
              workage:"2",
              education:"本科",
              salary:"10000"
            },
            {
              jobname:"机器学习工程师",
              city:"太原",
              workage:"2",
              education:"本科",
              salary:"10000"
            },
            {
              jobname:"机器学习工程师",
              city:"北京",
              workage:"2",
              education:"本科",
              salary:"10000"
            },
            {
              jobname:"机器学习工程师",
              city:"北京",
              workage:"2",
              education:"本科",
              salary:"10000"
            },
            {
              jobname:"机器学习工程师",
              city:"北京",
              workage:"2",
              education:"本科",
              salary:"10000"
            },
            {
              jobname:"机器学习工程师",
              city:"北京",
              workage:"2",
              education:"本科",
              salary:"10000"
            },*/
          ]
        }
      },
      mounted() {
        fetch("http://127.0.0.1:5000/getShanghaiData").then((e) => {
          return e.json()
        }).then((e) => {
          this.tableData = e
        })
      }
    }

</script>

<template>
  <el-table
      :data="tableData"
      style="width: 100%">
    <el-table-column
        prop="id"
        label="序号"
        width="180">
    </el-table-column>
    <el-table-column
        prop="date"
        label="日期"
        width="180">
    </el-table-column>
    <el-table-column
        prop="temperature"
        label="温度"
        width="180">
    </el-table-column>
    <el-table-column
        prop="weather"
        label="天气">
    </el-table-column>
    <el-table-column
        prop="wind"
        label="风向">
    </el-table-column>
    <el-table-column
        prop="level"
        label="风度">
    </el-table-column>
    <el-table-column
        prop="high"
        label="日出">
    </el-table-column>
    <el-table-column
        prop="low"
        label="日落">
    </el-table-column>
  </el-table>
</template>

<style scoped>

</style>